Repository navigation
fix: apply signer removal to every document in an envelope - #9101
Conversation
|
Thanks for opening your first pull request in this repository! ✌️ |
YvesCesar
left a comment
There was a problem hiding this comment.
Thanks @carlomarmo !
I made a few revisions. Could you take a look?
|
Thanks @YvesCesar. Removing a signer from the envelope now sends one cancellation notification, email and activity entry. Removing a signer directly from a document still notifies as before. I've added tests for both and moved the empty check before the child lookup. |
|
@carlomarmo thanks for your contribution. @vitormattos , that looks okay to me. I don't think these errors in the CI have anything to do with the PR. |
Keep the signer's identification details available when removing their requests from the documents in an envelope. Add tests for removing one of two signers and removing the last signer. Refs LibreSign#9085 Signed-off-by: Carlo Marmo <carlo.marmo@gmail.com>
Send the cancellation event for the envelope, not each document updated with it. Keep notifications for direct document removals. Check the email, notification and activity counts, and skip the child lookup when there are no identification methods. Signed-off-by: Carlo Marmo <carlo.marmo@gmail.com>
5bd8a4c to
e165e0c
Compare
|
Hi @carlomarmo, your first pull request to LibreSign has been merged. 🎉 Your work is part of LibreSign now, and everyone who signs a document with it benefits from the time and knowledge you shared. Thank you. You are very welcome to contribute again. The good first issue list is a good place to look next, and you no longer have to wonder how the process works. If you have a few minutes and feel like it, we would love to hear how this went for you: https://ls.librecode.coop/index.php/645932?lang=en&source=github-first-merged-pr&repository=libresign. It is entirely optional; nothing is expected of you in return for contributing. Come say hello in the LibreSign community: https://t.me/LibreSign |
Backport the Behat cancellation scenarios from #9101, including removal from child documents, last signer cleanup, and notification counts. Original contribution by Carlo Marmo in #9101. Co-authored-by: Carlo Marmo <carlo.marmo@gmail.com> Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Backport the Behat cancellation scenarios from #9101, including removal from child documents, last signer cleanup, and notification counts. Original contribution by Carlo Marmo in #9101. Co-authored-by: Carlo Marmo <carlo.marmo@gmail.com> Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Backport the Behat cancellation scenarios from #9101, including removal from child documents, last signer cleanup, and notification counts. Original contribution by Carlo Marmo in #9101. Co-authored-by: Carlo Marmo <carlo.marmo@gmail.com> Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Removing someone from an envelope currently leaves their signing requests open on the documents inside it. Remove the last signer and the envelope returns to draft, but its documents still wait for a signature. The person managing the package cannot rely on the envelope's signer list matching its documents.
The removal code was deleting the signer's identification details before using them to find the matching requests on the documents. This fix reuses the details already read before deletion, so removal reaches every document and leaves the other signers alone.
Two added tests cover removing one of two signers and removing the last signer. Both fail without the fix; all 15 focused Behat scenarios pass with it. PHP syntax and whitespace checks also pass.
Checked locally with PHP 8.3.6, Nextcloud 36 (development version) and SQLite. PHPUnit, static analysis, GitHub CI and the full supported-version matrix have not run.
Related to #9085.